import { Navigate } from "react-router-dom";
import Detail from "../pages/Detail";
import Index from "../pages/Index";
import Info from "../pages/Info";
import Login from "../pages/Login";
import PageNotFound from "../pages/PageNotFound";
import Users from "../pages/Users";

const routes = [
    {
        path:'/enter',
        element:<Index/>
    },
    {
        path:'/login',
        element:<Login/>
    },
    {
        path:'/users',
        element:<Users/>,
        children:[
            {
                path:'info',
                element:<Info/>
            },
            {
                path:'detail',
                element:<Detail/>
            }
        ]
    },
    {
        path:'/',
        element:<Navigate to='/enter' />
    },
    {
        path:'*',
        element:<PageNotFound/>
    }
]

export default routes;